package org.zxp.designpattern.singleton;

/**
 * @program: effectiveJava
 * @description: 懒汉 线程安全（低性能）
 * @author: X-Pacific zhang
 * @create: 2019-08-21 21:24
 **/
public class Singleton3 {
    private static Singleton3 INSTANCE;

    private Singleton3(){}

    public static synchronized Singleton3 getInstance(){
        if(INSTANCE == null){
            INSTANCE = new Singleton3();
        }
        return INSTANCE;
    }
}
